package stringexercise;

public class IndexOfDemo2 {
    public static void main(String[] args) {
        String str="Thinking in java";
        int index0=str.indexOf("in");
        System.out.println(index0);

        int index1=str.indexOf("in",3);
        System.out.println(index1);

        int index2=str.lastIndexOf("in");
        System.out.println(index2);

        int index3=str.indexOf("abc");
        System.out.println(index3);
    }
}
